/*----------------------------------------------------------------------------*/
/* Mark Liu
/* Tower.java
/* Method for running the lift
 * 
 * Up down and pasue methods
/*----------------------------------------------------------------------------*/

package logomotion_2011;
import edu.wpi.first.wpilibj.Solenoid;

public class Tower {
    
    //Solenoid for the main tower
    public static Solenoid solenoid_tower_pause  = new Solenoid(8,7);
    //Solenoid for tower pause
    public static Solenoid solenoid_tower_main = new Solenoid(8,8);
    
    /***************************************************************************
    * Method that runs the main cylinder for the forklift
    * Tower runs while switch is held
    * Pause when let go
    * SCREW THE FRC-KING RULES 
    ***************************************************************************/
    public static void Telop_Tower_Lift() {
        //Up
        if(!DriverStation_IO.getDigital(Constants.psoc_tower_up))
            Lift_Up();
        //Down
        else if(!DriverStation_IO.getDigital(Constants.psoc_tower_down))
           Lift_Down();
        //Pause
        else if(DriverStation_IO.getDigital(Constants.psoc_tower_pause)) 
            Lift_Pause();
    }
    public static void Lift_Up() {
        Lift_Unpause();
        solenoid_tower_main.set(true);
    }
    public static void Lift_Down() {
        Lift_Unpause();
        solenoid_tower_main.set(false);
    }
    public static void Lift_Pause() {
        solenoid_tower_pause.set(false);
        solenoid_tower_main.set(true);
    }
    public static void Lift_Unpause() {
        solenoid_tower_pause.set(true);
    }
}
